const BASE_URL = 'http://8.134.172.28:3008';

function getGoodNavType(basefun) {
	ajax({
		method: 'GET',
		url: BASE_URL + '/api_cat',
		type: 'JSON',
		callback: basefun

	})
}
/*点击关闭侧边栏*/
let close = document.querySelector("button[class='close']");
close.addEventListener('click', () => {
	let qrCode = document.querySelector("div[class='qrCode']");
	qrCode.style.display = 'none';
})
/*下滑隐藏箭头*/
let arrow = document.querySelector("div[class='arrow']")
window.addEventListener('scroll', () => {
	let scrolly = window.scrollY;
	if (scrollY >= 200) {
		arrow.style.display = "block";
	} else {
		arrow.style.display = 'none';
	}
})
/*箭头添加点击事件*/
arrow.addEventListener("click", () => {
	window.scrollTo({
		top: 0,
		behavior: 'smooth'
	})
})
/*function getGoodNavType(){
	let typeList =[];
	ajax({
		method:'GET',
		url:BASE_URL+'/api_cat',
		type:'JSON',
		callback:function(data){
			typeList=data.data;
		}
	})
	return typeList;
}*/